function validateLoginUserFunction(){
	var flag = false;
//	trim()表示去除前后空格
	var userCode = $.trim($("#userCode").val());
	var userPassword = $.trim($("#userPassword").val());
	
	if(userCode == "" || userCode == null){
//		focus()表示获取焦点
		$("#userCode").focus();
		alert("账号不能为空");
	}else if(userPassword == "" || userPassword == null){
		$("#userPassword").focus();
		alert("密码不能为空");
	}else{
		$.ajax({
			url:"${pageContext.request.contextPath }/validateLoginUserFunction.action",
			type:"POST",
			async:false,
			data:{"user.userCode":userCode,"user.userPassword":userPassword},
			dataType:"html",
			success:function(result){
				if(result == "nonentity"){
//					用户不存在
					alert("用户不存在");
				}else if(result == "errorPwd"){
//					密码错误
					alert("密码错误");
				}else if(result == "exist"){
//					用户存在
					flag=true
				}
			}
		});
	}
	
	return flag;
}